//
//  CustomCollectionViewCell.m
//  FIrst
//
//  Created by RAMBO on 15/4/10.
//  Copyright (c) 2015年 Myfuture. All rights reserved.
//

#import "CustomCollectionViewCell.h"

#define WIDTH 375
#define HEIGHT 470

@interface CustomCollectionViewCell ()


@end

@implementation CustomCollectionViewCell

- (void)dealloc
{
    [_upImageView release];
    [_downImageView release];
    [_sourceLable release];
    [_numLabel release];
    [_titleLabel release];
    [_monthLabel release];
    
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.upImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
        [self.contentView addSubview:_upImageView];
        [_upImageView release];
        self.downImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, HEIGHT, WIDTH, 85)];
        [self.contentView addSubview:_downImageView];
        [_downImageView release];
        [_downImageView setBackgroundColor:[UIColor whiteColor]];
        
        self.numLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 60, 60)];
        [_downImageView addSubview:_numLabel];
        [_numLabel release];
        [_numLabel setFont:[UIFont boldSystemFontOfSize:22]];
                
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(80, 15, 250, 20)];
        [_downImageView addSubview:_titleLabel];
        [_titleLabel release];
        _titleLabel.font = [UIFont boldSystemFontOfSize:16];
        
        self.sourceLable = [[UILabel alloc] initWithFrame:CGRectMake(80, 35, 100, 30)];
        [_downImageView addSubview:_sourceLable];
        [_sourceLable release];
        [_sourceLable setTextColor:[UIColor colorWithRed:0.8 green:0.8 blue:0.8 alpha:0.8]];
        _sourceLable.font = [UIFont systemFontOfSize:15];
        
        
        UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
        [button1 setImage:[UIImage imageNamed:@"rightIcon"] forState:UIControlStateNormal];
        [button1 setFrame:CGRectMake(340, 25, 20, 30)];
        [_downImageView addSubview:button1];
    }
    return self;
}


@end
